package com.one.rope.mvp.web.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Weijian.Liu
 * @desc 项目进展枚举
 * @date 2020/2/20 14:47
 */
@Getter
@AllArgsConstructor
public enum ProjectProgressEnum {

  /**
   * 1：商业计划 2：已立项 3：已变现 4：已盈利
   */
  PROGRESS1(1, "商业计划"),
  PROGRESS2(2, "已立项"),
  PROGRESS3(3, "已变现"),
  PROGRESS4(4, "已盈利");

  private int code;
  private String name;

  public static String getName(int code) {
    for (ProjectProgressEnum o : ProjectProgressEnum.values()) {
      if (o.code == code) {
        return o.name;
      }
    }
    return "";
  }
}
